using FwkLight.Persistence;
using StructureMap.Attributes;
using StructureMap.Configuration.DSL;

namespace FwkLight.DependencyRegistries
{
  public class BasePersistenceRegistry : Registry
  {
    public BasePersistenceRegistry ( )
    {
      ForRequestedType<INHUnitOfWork>().CacheBy(InstanceScope.HttpContext)
								.TheDefault.Is.OfConcreteType<NHibernateUnitOfWork>();

      ForRequestedType<INHUnitOfWorkProvider>().TheDefaultIsConcreteType<NHUnitOfWorkProvider>();
    }
  }
}